package cn.zhl.设计模式.原型;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2021-03-06 11:49
 **/
public class Sheep implements Cloneable{
	private String name;
	private int age;
	private String color;

	private DeepObj deepObj;

	@Override
	protected Object clone() {
		Sheep rs = null;
		try {
			rs = (Sheep) super.clone();
			rs.deepObj = (DeepObj) this.deepObj.clone();
		}catch (Exception e){
			e.printStackTrace();
		}
		return rs;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public DeepObj getDeepObj() {
		return deepObj;
	}

	public void setDeepObj(DeepObj deepObj) {
		this.deepObj = deepObj;
	}
}
